<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css处理</title>
    <script type="text/javascript" src="../js/jquery-3.4.1.min.js"></script>
    <style>
        div{
            width: 200px;
            height: 100px;
            background: red;
        }
        .c1{
            width: 400px;
            height: 200px;
            background: blue;
        }
    </style>
    <script>
        $(function(){
           $("#d1").mouseover(function(){
               // $("#d1").addClass("c1");
               $("#d1").css("width","400px")
               $("#d1").css("height","200px")
               $("#d1").css("background-color","blue");
           });
           $("#d1").mouseout(function(){
              $("#d1").removeClass("c1");
               $("#d1").css("width","200px")
               $("#d1").css("height","100px")
               $("#d1").css("background-color","red");
           });
        });
    </script>
</head>
<body>
<div id="d1"></div>
</body>
</html>